<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Essay Scorer</title>
    <style>
        body {
            font-family: Arial, sans-serif;
            margin: 0;
            padding: 0;
            min-height: 100vh;
            background: linear-gradient(135deg, #e0f7fa, #b3e5fc);
            overflow-x: hidden;
        }
        .container {
            max-width: 1200px;
            margin: 0 auto;
            padding: 20px;
        }
        header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 20px;
        }
        h1 {
            color: #1565c0;
        }
        .user-menu {
            position: relative;
        }
        .user-avatar {
            width: 40px;
            height: 40px;
            border-radius: 50%;
            background-color: #64b5f6;
            display: flex;
            justify-content: center;
            align-items: center;
            color: white;
            font-weight: bold;
            cursor: pointer;
        }
        .user-dropdown {
            display: none;
            position: absolute;
            right: 0;
            top: 100%;
            background-color: white;
            border: 1px solid #ddd;
            border-radius: 4px;
            padding: 10px;
            box-shadow: 0 2px 10px rgba(0,0,0,0.1);
        }
        .user-dropdown a {
            display: block;
            padding: 5px 0;
            color: #333;
            text-decoration: none;
        }
        .user-avatar:hover + .user-dropdown, .user-dropdown:hover {
            display: block;
        }
        .content {
            display: flex;
            gap: 20px;
        }
        .input-section, .output-section {
            flex: 1;
        }
        textarea {
            width: 100%;
            height: 300px;
            padding: 10px;
            border: 1px solid #ddd;
            border-radius: 4px;
            resize: vertical;
        }
        button {
            margin-top: 10px;
            padding: 10px 20px;
            background-color: #4caf50;
            color: white;
            border: none;
            border-radius: 4px;
            cursor: pointer;
        }
        button:hover {
            background-color: #45a049;
        }
        .result {
            background-color: white;
            border-radius: 4px;
            padding: 20px;
            margin-top: 20px;
            box-shadow: 0 2px 10px rgba(0,0,0,0.1);
        }
        .score {
            font-size: 24px;
            font-weight: bold;
            color: #4caf50;
        }
        .wave {
            position: absolute;
            bottom: 0;
            left: 0;
            width: 100%;
            height: 100px;
            background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1440 320"><path fill="%234caf50" fill-opacity="0.3" d="M0,160L48,176C96,192,192,224,288,213.3C384,203,480,149,576,149.3C672,149,768,203,864,224C960,245,1056,235,1152,208C1248,181,1344,139,1392,117.3L1440,96L1440,320L1392,320C1344,320,1248,320,1152,320C1056,320,960,320,864,320C768,320,672,320,576,320C480,320,384,320,288,320C192,320,96,320,48,320L0,320Z"></path></svg>');
            background-size: 1440px 100px;
            animation: wave 10s linear infinite;
        }
        .wave:nth-child(2) {
            bottom: 10px;
            opacity: 0.5;
            background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1440 320"><path fill="%232196f3" fill-opacity="0.3" d="M0,64L48,80C96,96,192,128,288,128C384,128,480,96,576,112C672,128,768,192,864,202.7C960,213,1056,171,1152,149.3C1248,128,1344,128,1392,128L1440,128L1440,320L1392,320C1344,320,1248,320,1152,320C1056,320,960,320,864,320C768,320,672,320,576,320C480,320,384,320,288,320C192,320,96,320,48,320L0,320Z"></path></svg>');
            animation: wave 15s linear infinite;
        }
        @keyframes wave {
            0% { background-position-x: 0; }
            100% { background-position-x: 1440px; }
        }
    </style>
</head>
<body>
    <div class="wave"></div>
    <div class="wave"></div>
    <div class="container">
        <header>
            <h1>Essay Scorer</h1>
            <div class="user-menu">
                <div class="user-avatar">U</div>
                <div class="user-dropdown">
                    <a href="#">Profile</a>
                    <a href="#">Settings</a>
                    <a href="#">Log out</a>
                </div>
            </div>
        </header>
        <div class="content">
            <div class="input-section">
                <textarea placeholder="Enter your essay here..."></textarea>
                <button onclick="evaluateEssay()">Evaluate Essay</button>
            </div>
            <div class="output-section">
                <div id="score-result" class="result" style="display: none;">
                    <h2>Essay Score</h2>
                    <div class="score"></div>
                </div>
                <div id="feedback-result" class="result" style="display: none;">
                    <h2>Feedback</h2>
                    <p></p>
                </div>
            </div>
        </div>
    </div>

    <script>
        function evaluateEssay() {
            // 模拟评分过程
            const score = Math.floor(Math.random() * 41) + 60; // 60到100之间的随机分数
            const feedback = "Your essay demonstrates a good understanding of the topic. However, there's room for improvement in structure and argumentation. Consider adding more specific examples to support your points.";

            // 显示结果
            const scoreResult = document.getElementById('score-result');
            const feedbackResult = document.getElementById('feedback-result');

            scoreResult.style.display = 'block';
            scoreResult.querySelector('.score').textContent = score + '/100';

            feedbackResult.style.display = 'block';
            feedbackResult.querySelector('p').textContent = feedback;
        }
    </script>
</body>
</html>